package com.jz.community.moduleshopping.goodsDetail.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jz.community.basecomm.bean.baseGoods.BaseGoodsInfo;
import com.jz.community.basecomm.utils.BaseImageLoaderUtils;
import com.jz.community.moduleshopping.R;

import java.util.List;

public class ShopDetailAdapter extends BaseQuickAdapter<BaseGoodsInfo.EmbeddedBeanXX.ContentBeanX, BaseViewHolder> {

    public ShopDetailAdapter(@Nullable List<BaseGoodsInfo.EmbeddedBeanXX.ContentBeanX> data) {
        super(R.layout.module_shopping_item_gt_shop, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BaseGoodsInfo.EmbeddedBeanXX.ContentBeanX entity) {
        ImageView imageView = helper.getView(R.id.gt_shoo_goods_img);
        BaseImageLoaderUtils.getInstance().loadDefaltImage(mContext, imageView, entity.getIcon());
        helper.setText(R.id.gt_shoo_goods_name, entity.getTitle());

    }
}
